<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<body>
    <header>
        <div class="header-container">
            <div class="nav-box">
                <!-- logo -->
                <div class="nav-left">
                    <a id="logo_top" th:href="@{'/front/index'}" target="_Self">
                        <img th:each="image,iterStat : ${images}" th:src="@{${image.imgUrl}}" th:if="${image.imgType == 1}">
                    </a>
                </div>
                <!-- memu选项 -->
                <div class="nav-mid">
                    <div id="lang">
                        <a href="#"></a>
                    </div>
                    <ul class="navbar-nav">
                        <li><a class="" th:href="@{'/front/index'}"  th:classappend="'index' eq ${target} ?'active':''" target="_Self">首页</a></li>
                        <li th:each="webMenu,itemStat:${sWebMenus}">
                            <a class="" th:href="@{'/front/'+${webMenu.typeValue}}" th:classappend="${webMenu.typeValue} eq ${target} ?'active':''" target="_Self">
                                [[${webMenu.name}]]
                            </a>
                        </li>
                    </ul>
                </div>
                <!-- 响应式菜单 -->
                <div class="nav-mobile-menu">
                    <span class="sidebar_trigger"></span>
                </div>
            </div>
        </div>
    </header>
    <script src="../../static/front/js/jquery.min.js" th:src="@{/front/js/jquery.min.js}"></script>
    <script type="text/javascript">
        // 给所有的li绑定点击事件：1、删除所有的class名；2、对当前点击的li添加class=“active”。
        $("a").click(function() {
            $("a").removeClass();
            $(this).addClass("active")
        })
    </script>
</body>
</html>
